<h2> My Dashboard </h2>
<font size = 4>Welcome <strong><?php echo $this->session->userdata('firstname'); ?></strong>!</font><br />
<?php
	if ($profile_pic == null or $profile_pic == ""){
	}
	else{
		$base = base_url();
		echo "<img src=\"$base/uploads/$profile_pic\" alt=\"some_text\"/>";
	}
?>
<br/>


Member since: <?php echo $this->session->userdata('reg_date'); ?><br />
Last login: <?php echo $this->session->userdata('last_login'); ?>
<h2>My Calendar</h2>
<?php
	echo $this->calendar->generate($year, $month, $mark);	
?>

<link  href="http://localhost/pollwatcher/public/css/tipsy.css" rel="stylesheet" type="text/css" /><link rel="stylesheet" href="http://localhost/pollwatcher/public/css/tipsy.css" type="text/css" media="screen" /> 
<script src="<?php echo base_url(); ?>public/js/jquery.js"></script>
<script src="<?php echo base_url(); ?>public/js/jquery.tipsy.js"></script>

<?php
echo "<script type='text/javascript'>$(document).ready(function() {";
for($i = 1; $i <= 31; $i++)
{
	$tooltip = "";
	
	if(sizeof($events[$i]) > 0)
	{
		for($j = 0; $j< sizeof($events[$i]); $j++)
		{
			$tooltip .= $events[$i][$j]."<br /><br />";	
		
		}
		echo "$('td > a:contains($i)').attr(\"title\", \"$tooltip\");";
		echo "$('td > a:contains($i)').tipsy({html: true , gravity: 'w'});";
	}
}

echo "});</script>";
?>
